Skip to main content

SelectFirst

SelectFirst[data,crit] gives the first ei of data for which crit[ei] is True, or Missing["NotFound"] if none is found.

SelectFirst[data,crit->prop] returns the property prop of the selected elements.

SelectFirst[data,crit,default] gives default if there is no ei of data such that crit[ei] is True.

SelectFirst[crit] represents an operator form of SelectFirst that can be applied to an expression.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.